package com.bobo.base;


import android.view.ViewGroup;
import android.widget.Toast;

import com.bobo.base.databinding.ActivityTestBinding;
import com.bobo.base.viewmodel.CommonViewModel;

/**
 * 描述：
 * 作者: sheng
 * 日期: 2025/7/24 16:16
 */
public class TestActivity extends BaseActivity<ActivityTestBinding>{

    private CommonViewModel viewModel = new CommonViewModel(bindToLifecycle());
    @Override
    protected ActivityTestBinding getViewBinding() {
        return ActivityTestBinding.inflate(getLayoutInflater());
    }

    @Override
    protected ViewGroup initTitle() {
        return initTitleNative("测试");
    }

    @Override
    protected void initViews() {
        viewModel.tapPoint("1");
    }

    @Override
    protected void initListeners() {
        viewModel.tapLiveData.observe(this, s -> {
            Toast.makeText(this, s, Toast.LENGTH_SHORT).show();
        });
    }

    @Override
    protected void initData() {

    }
}
